package com.vf.cloud.common.listener;

import org.springframework.context.ApplicationListener;
import org.springframework.context.event.ContextClosedEvent;
import org.springframework.stereotype.Component;

import com.vf.cloud.server.render.cache.RNMSCache;

import lombok.extern.slf4j.Slf4j;

@Slf4j
@Component
public class ApplicationClosedEventListener implements ApplicationListener<ContextClosedEvent>{
	@Override
	public void onApplicationEvent(ContextClosedEvent event) {
		if(RNMSCache.renderNMS!=null) {
			RNMSCache.renderNMS.close();
		}
		log.info("销毁信令服务器.");
	}


}
